{% extends "front/settings.html" %}

{% block content %}
    <h2 class="page-header">喜欢的帖子</h2>

    <div class="liked-posts-list">
        {% for post in posts %}
            <div class="liked-post-item">
                <div class="post-info">
                    <div class="post-title">
                        <a href="#" class="title-link">
                            {{ post.title }}
                        </a>
                    </div>
                </div>
                <div class="post-action">
                    <img src="{{ url_for("static", filename="front/images/liked.png" ) }}"
                         data-post-id="{{ post.id }}"
                         alt="取消点赞" title="取消点赞" class="like-icon" id="cancel-liked-btn">
                </div>
            </div>
        {% endfor %}
    </div>

    <!-- 空状态模板，初始隐藏 -->
    <div id="empty-state-template" style="display: none;">
        <div class="no-liked-posts">
            <div class="empty-state">
                <i class="glyphicon glyphicon-heart-empty" style="font-size: 48px; color: #ccc;"></i>
                <h3>还没有点赞的帖子</h3>
                <p>去论坛发现精彩内容并点赞吧！</p>
                <a href="{{ url_for('front.index') }}" class="btn btn-primary">去首页</a>
            </div>
        </div>
    </div>
{% endblock %}
